// src/main/java/com/zrx/zrxaicodemother/service/AppService.java
package com.zrx.zrxaicodemother.service;

import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.core.service.IService;
import com.zrx.zrxaicodemother.common.BaseResponse;
import com.zrx.zrxaicodemother.model.dto.app.AppAddRequest;
import com.zrx.zrxaicodemother.model.dto.app.AppQueryRequest;
import com.zrx.zrxaicodemother.model.entity.App;
import com.zrx.zrxaicodemother.model.entity.User;
import com.zrx.zrxaicodemother.model.vo.AppVO;
import jakarta.servlet.http.HttpServletRequest;
import reactor.core.publisher.Flux;

import java.util.List;

/**
 * 应用 服务层。
 *
 * @author zrx
 */
public interface AppService extends IService<App> {


    /**
     * 获取查询包装器
     *
     * @param appQueryRequest 查询请求
     * @return 查询包装器
     */
    QueryWrapper getQueryWrapper(AppQueryRequest appQueryRequest);

    AppVO getAppVO(App app);

    List<AppVO> getAppVOList(List<App> appList);

    void generateAppScreenshotAsync(Long appId, String appUrl);

    Flux<String> chatToGenCode(Long appId, String message, User loginUser);

    String deployApp(Long appId, User loginUser);

    Long createApp(AppAddRequest appAddRequest, User loginUser);
}
